<?php 
    echo $this->Html->script('jquery/jquery.validate.min');
?>
<div class="brands form">
<?php echo $this->Form->create('Brand',array('id'=>'brandForm'));?>
	<fieldset>
		<legend><?php __('Brand Registration'); ?></legend>
	<?php
		echo $this->Form->input('name',array('class'=>'required'));
		echo $this->Form->input('location',array('class'=>'required'));
		echo $this->Form->input('url',array('class'=>'required url'));
		
        foreach($brandUrls as $brandUrl)
        {
            echo $this->Form->input($brandUrl['BrandUrl']['system_name'].'_url',array('class'=>'required url'));    
        }       
     
		echo $this->Form->input('industry',array('class'=>'required'));
		echo $this->Form->input('submitters_name',array('class'=>'required'));
		echo $this->Form->input('submitters_email',array('class'=>'required email'));
		//echo $this->Form->input('status');
		//echo $this->Form->input('points');
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
<script>
    $(document).ready(function(){
        $('#brandForm').validate(
            {		
			errorElement: "div"
            }
         );
    });
</script>